import {RouteRecordRaw, RouterView} from 'vue-router'

const routeName = 'role'

export const role: Array<RouteRecordRaw> = [
    {
        path: '/role',
        name: routeName,
        redirect: '/role/roles',
        component:  () => import(/* webpackChunkName: "role-index" */ '@/views/role/index.vue'),
        meta: {
            title: '角色权限',
        },
        children: [
            {
                path: 'roles',
                name: `${routeName}-roles`,
                meta: {
                    title: '角色管理',
                },
                component: () => import(/* webpackChunkName: "role-roles" */ '@/views/role/components/roles/roles.vue'),
            },
            {
                path: 'permission',
                name: `${routeName}-permission`,
                meta: {
                    title: '权限管理',
                },
                component: () => import(/* webpackChunkName: "role-permission" */ '@/views/role/components/permission/permission.vue'),
            }
        ]
    }
]
